{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true,
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "         214 function calls (207 primitive calls) in 0.000 seconds\n",
      "\n",
      "   Ordered by: standard name\n",
      "\n",
      "   ncalls  tottime  percall  cumtime  percall filename:lineno(function)\n",
      "        1    0.000    0.000    0.000    0.000 <string>:1(<module>)\n",
      "        2    0.000    0.000    0.000    0.000 enum.py:359(__call__)\n",
      "        2    0.000    0.000    0.000    0.000 enum.py:678(__new__)\n",
      "        1    0.000    0.000    0.000    0.000 enum.py:986(__and__)\n",
      "        1    0.000    0.000    0.000    0.000 re.py:249(compile)\n",
      "        1    0.000    0.000    0.000    0.000 re.py:288(_compile)\n",
      "        1    0.000    0.000    0.000    0.000 sre_compile.py:265(_compile_charset)\n",
      "        1    0.000    0.000    0.000    0.000 sre_compile.py:292(_optimize_charset)\n",
      "        2    0.000    0.000    0.000    0.000 sre_compile.py:477(_get_iscased)\n",
      "        1    0.000    0.000    0.000    0.000 sre_compile.py:485(_get_literal_prefix)\n",
      "        1    0.000    0.000    0.000    0.000 sre_compile.py:516(_get_charset_prefix)\n",
      "        1    0.000    0.000    0.000    0.000 sre_compile.py:560(_compile_info)\n",
      "        2    0.000    0.000    0.000    0.000 sre_compile.py:619(isstring)\n",
      "        1    0.000    0.000    0.000    0.000 sre_compile.py:622(_code)\n",
      "        1    0.000    0.000    0.000    0.000 sre_compile.py:783(compile)\n",
      "      3/1    0.000    0.000    0.000    0.000 sre_compile.py:87(_compile)\n",
      "        3    0.000    0.000    0.000    0.000 sre_parse.py:112(__init__)\n",
      "        7    0.000    0.000    0.000    0.000 sre_parse.py:161(__len__)\n",
      "       18    0.000    0.000    0.000    0.000 sre_parse.py:165(__getitem__)\n",
      "        7    0.000    0.000    0.000    0.000 sre_parse.py:173(append)\n",
      "      3/1    0.000    0.000    0.000    0.000 sre_parse.py:175(getwidth)\n",
      "        1    0.000    0.000    0.000    0.000 sre_parse.py:225(__init__)\n",
      "        8    0.000    0.000    0.000    0.000 sre_parse.py:234(__next)\n",
      "        2    0.000    0.000    0.000    0.000 sre_parse.py:250(match)\n",
      "        6    0.000    0.000    0.000    0.000 sre_parse.py:255(get)\n",
      "        1    0.000    0.000    0.000    0.000 sre_parse.py:287(tell)\n",
      "        1    0.000    0.000    0.000    0.000 sre_parse.py:436(_parse_sub)\n",
      "        2    0.000    0.000    0.000    0.000 sre_parse.py:494(_parse)\n",
      "        1    0.000    0.000    0.000    0.000 sre_parse.py:76(__init__)\n",
      "        2    0.000    0.000    0.000    0.000 sre_parse.py:82(groups)\n",
      "        1    0.000    0.000    0.000    0.000 sre_parse.py:928(fix_flags)\n",
      "        1    0.000    0.000    0.000    0.000 sre_parse.py:944(parse)\n",
      "        1    0.000    0.000    0.000    0.000 {built-in method _sre.compile}\n",
      "        1    0.000    0.000    0.000    0.000 {built-in method builtins.exec}\n",
      "       25    0.000    0.000    0.000    0.000 {built-in method builtins.isinstance}\n",
      "    29/26    0.000    0.000    0.000    0.000 {built-in method builtins.len}\n",
      "        2    0.000    0.000    0.000    0.000 {built-in method builtins.max}\n",
      "        9    0.000    0.000    0.000    0.000 {built-in method builtins.min}\n",
      "        6    0.000    0.000    0.000    0.000 {built-in method builtins.ord}\n",
      "       48    0.000    0.000    0.000    0.000 {method 'append' of 'list' objects}\n",
      "        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}\n",
      "        5    0.000    0.000    0.000    0.000 {method 'find' of 'bytearray' objects}\n",
      "        1    0.000    0.000    0.000    0.000 {method 'items' of 'dict' objects}\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import cProfile\n",
    "import re\n",
    "\n",
    "cProfile.run('re.compile(\"foo|bar\")')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}